import React, { useState, useEffect, useRef } from 'react';
import { Button } from 'antd';
import { history } from 'umi';
import styles from './index.less';

var rootData = {
  hooks: '/hooks',
  rxjs: '/rxjs',
  styledComponents: '/styledComponents',
  sentry: '/sentry',
};

export default props => {
  return (
    <div className={styles.page}>
      {Object.keys(rootData).map((item, i) => {
        return (
          <Button
            key={i}
            type="primary"
            className={styles.buttonItem}
            onClick={() => history.push(rootData[item])}
          >
            {' '}
            {item}
          </Button>
        );
      })}
    </div>
  );
};
